package UILayer;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.JPanel;

public class NewPanel extends JPanel
{
	  private BufferedImage image;
	  
	  public NewPanel(boolean is_login)
	  {
		  try
		  {
			  if(is_login)
			  {
				  image = ImageIO.read(new File("src/UILayer/vestbjerg.jpg"));
			  }
			  else
			  {
				  image = ImageIO.read(new File("src/UILayer/opti.jpg"));
			  }
		  }
		  catch(IOException e)
		  {
			  
		  }
	  }
	  
	  protected void paintComponent(Graphics temp)
	  {
	    super.paintComponent(temp);
	    temp.drawImage(image, 0, 0, getWidth(), getHeight(), this);
	  }
	}
